<!doctype html public "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <title>Ext.Toolbar</title>
        <link rel="stylesheet" type="text/css" href="../resources/reset.css"/>
        <link rel="stylesheet" type="text/css" href="../resources/style.css" media="screen"/>
        <link rel="stylesheet" type="text/css" href="../resources/print.css" media="print">
        <!-- GC -->
    </head>
    <body>
            <div class="body-wrap">
        <div class="top-tools">
        	<img src="../resources/print.gif" width="16" height="16" align="absmiddle">&nbsp;<a href="Ext.Toolbar.html" target="_blank">Print Friendly</a><br/>

        </div>
        <h1>Class Ext.Toolbar</h1>
        <table cellspacing="0">
            <tr><td class="label">Package:</td><td>Ext</td></tr>
            <tr><td class="label">Class:</td><td>Toolbar</td></tr>
                        <tr><td class="label">Extends:</td><td>Object</td></tr>
                                    <tr><td class="label">Subclasses:</td><td><a ext:cls="Ext.PagingToolbar" href="Ext.PagingToolbar.html">PagingToolbar</a></td></tr>
                        <tr><td class="label">Defined In:</td><td><a href="Toolbar.jss.html">Toolbar.js</a></td></tr>
        </table>
        <div class="description">
            Basic Toolbar class.        </div>
        <br />
        	<a href="#properties">Properties</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#methods">Methods</a>
			&nbsp;&nbsp;-&nbsp;&nbsp;<a href="#events">Events</a>
        	        <hr />
        <a name="properties"></a>
        <h2>Public Properties</h2>
        <div class="no-members">This class has no public properties.</div>        <a name="methods"></a>
        <h2>Public Methods</h2>
                <table cellspacing="0" class="member-table">
            <tr>
                <th class="sig-header" colspan="2">Method</th>
                <th class="msource-header">Defined By</th>
            </tr>
                <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><b>Toolbar</b>(&nbsp;<code>String/HTMLElement/Element container</code>, <span class="optional" title="Optional">[<code>Array buttons</code>]</span>, <code>Object config</code>&nbsp;)</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Creates a new Toolbar</td>
    </tr>
        <tr class=" alt" expandable>
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#add">add</a>(&nbsp;<code>Mixed arg1</code>, <code>Mixed arg2</code>, <code>Mixed etc.</code>&nbsp;) : void</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt" expandable>
        <td class="mdesc">Adds element(s) to the toolbar -- this function takes a variable number of 
arguments of mixed type and adds them to ...</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addButton">addButton</a>(&nbsp;<code>Object/Array config</code>&nbsp;) : Ext.Toolbar.Button/Array</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Adds a button (or buttons). See <a ext:cls="Ext.Toolbar.Button" href="Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> for more info on the config.</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addDom">addDom</a>(&nbsp;<code>Object config</code>&nbsp;) : Ext.Toolbar.Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Adds a new element to the toolbar from the passed <a ext:cls="Ext.DomHelper" href="Ext.DomHelper.html">Ext.DomHelper</a> config.</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addElement">addElement</a>(&nbsp;<code>String/HTMLElement/Element el</code>&nbsp;) : Ext.Toolbar.Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Adds any standard HTML element to the toolbar</td>
    </tr>
        <tr class=" alt" expandable>
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addField">addField</a>(&nbsp;<code>Ext.form.Field field</code>&nbsp;) : Ext.ToolbarItem</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt" expandable>
        <td class="mdesc">Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
been rendered ...</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addFill">addFill</a>() : Ext.Toolbar.Fill</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Adds a fill element that forces subsequent additions to the right side of the toolbar</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addItem">addItem</a>(&nbsp;<code>Ext.Toolbar.Item item</code>&nbsp;) : Ext.Toolbar.Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Adds any Toolbar.Item or subclass</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addSeparator">addSeparator</a>() : Ext.Toolbar.Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Adds a separator</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addSpacer">addSpacer</a>() : Ext.Toolbar.Spacer</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Adds a spacer element</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#addText">addText</a>(&nbsp;<code>String text</code>&nbsp;) : Ext.Toolbar.Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Adds text to the toolbar</td>
    </tr>
        <tr class=" alt">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#getEl">getEl</a>() : Ext.Element</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class=" alt">
        <td class="mdesc">Returns the Element for this toolbar.</td>
    </tr>
        <tr class="">
        <td class="micon" rowspan="2">&nbsp;</td>
        <td class="sig"><a class="mlink" href="#insertButton">insertButton</a>(&nbsp;<code>Number index</code>, <code>Object/Ext.Toolbar.Item/Ext.Toolbar.Button (may</code>&nbsp;) : Ext.Toolbar.Button/Item</td>
        <td class="msource" rowspan="2">Toolbar</td>
    </tr>
    <tr class="">
        <td class="mdesc">Inserts any <a ext:cls="Ext.Toolbar.Item" href="Ext.Toolbar.Item.html">Ext.Toolbar.Item</a>/<a ext:cls="Ext.Toolbar.Button" href="Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> at the specified index.</td>
    </tr>
            </table>
                <a name="events"></a>
        <h2>Public Events</h2>
        <div class="no-members">This class has no public events.</div>                
                    <a name="Toolbar"></a>
            <h2 class="mdetail-head">Constructor Details</h2>
            <div class="detail-wrap">
                <div class="mdetail">
                <h3>Toolbar</i></h3>
                <code>public function Toolbar(&nbsp;<code>String/HTMLElement/Element container</code>, <span class="optional" title="Optional">[<code>Array buttons</code>]</span>, <code>Object config</code>&nbsp;)</code>
                <div class="mdetail-desc">
                Creates a new Toolbar                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>container</code> : String/HTMLElement/Element<div class="sub-desc">The id or element that will contain the toolbar</div></li><li><code>buttons</code> : Array<div class="sub-desc">(optional) array of button configs or elements to add</div></li><li><code>config</code> : Object<div class="sub-desc">The config object</div></li>                    </ul>
                </div>
                </div>
                </div>
            </div>
        
                    <h2 class="mdetail-head">Method Details</h2>
            <div class="detail-wrap">
                            <a name="add"></a>
                <div class="mdetail">
                <h3>add</i></h3>
                <code>public function add(&nbsp;<code>Mixed arg1</code>, <code>Mixed arg2</code>, <code>Mixed etc.</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds element(s) to the toolbar -- this function takes a variable number of 
arguments of mixed type and adds them to the toolbar.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>arg1</code> : Mixed<div class="sub-desc">The following types of arguments are all valid:<br />
<ul>
<li><a ext:cls="Ext.Toolbar.Button" href="Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> config: A valid button config object (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addButton" href="Ext.Toolbar.html#addButton">addButton</a>)</li>
<li>HtmlElement: Any standard HTML element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addElement" href="Ext.Toolbar.html#addElement">addElement</a>)</li>
<li>Field: Any form field (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addField" href="Ext.Toolbar.html#addField">addField</a>)</li>
<li>Item: Any subclass of <a ext:cls="Ext.Toolbar.Item" href="Ext.Toolbar.Item.html">Ext.Toolbar.Item</a> (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addItem" href="Ext.Toolbar.html#addItem">addItem</a>)</li>
<li>String: Any generic string (gets wrapped in a <a ext:cls="Ext.Toolbar.TextItem" href="Ext.Toolbar.TextItem.html">Ext.Toolbar.TextItem</a>, equivalent to <a ext:cls="Ext.Toolbar" ext:member="addText" href="Ext.Toolbar.html#addText">addText</a>).
Note that there are a few special strings that are treated differently as explained next.</li>
<li>'separator' or '-': Creates a separator element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addSeparator" href="Ext.Toolbar.html#addSeparator">addSeparator</a>)</li>
<li>' ': Creates a spacer element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addSpacer" href="Ext.Toolbar.html#addSpacer">addSpacer</a>)</li>
<li>'->': Creates a fill element (equivalent to <a ext:cls="Ext.Toolbar" ext:member="addFill" href="Ext.Toolbar.html#addFill">addFill</a>)</li>
</ul></div></li><li><code>arg2</code> : Mixed<div class="sub-desc"></div></li><li><code>etc.</code> : Mixed<div class="sub-desc"></div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>void</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addButton"></a>
                <div class="mdetail alt">
                <h3>addButton</i></h3>
                <code>public function addButton(&nbsp;<code>Object/Array config</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds a button (or buttons). See <a ext:cls="Ext.Toolbar.Button" href="Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> for more info on the config.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>config</code> : Object/Array<div class="sub-desc">A button config or array of configs</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Button/Array</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addDom"></a>
                <div class="mdetail">
                <h3>addDom</i></h3>
                <code>public function addDom(&nbsp;<code>Object config</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds a new element to the toolbar from the passed <a ext:cls="Ext.DomHelper" href="Ext.DomHelper.html">Ext.DomHelper</a> config.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>config</code> : Object<div class="sub-desc"></div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Item</code><div class="sub-desc">The element's item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addElement"></a>
                <div class="mdetail alt">
                <h3>addElement</i></h3>
                <code>public function addElement(&nbsp;<code>String/HTMLElement/Element el</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds any standard HTML element to the toolbar
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>el</code> : String/HTMLElement/Element<div class="sub-desc">The element or id of the element to add</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Item</code><div class="sub-desc">The element's item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addField"></a>
                <div class="mdetail">
                <h3>addField</i></h3>
                <code>public function addField(&nbsp;<code>Ext.form.Field field</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds a dynamically rendered Ext.form field (TextField, ComboBox, etc). Note: the field should not have
been rendered yet. For a field that has already been rendered, use <a ext:cls="Ext.Toolbar" ext:member="addElement" href="Ext.Toolbar.html#addElement">addElement</a>.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>field</code> : Ext.form.Field<div class="sub-desc"></div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.ToolbarItem</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addFill"></a>
                <div class="mdetail alt">
                <h3>addFill</i></h3>
                <code>public function addFill()</code>
                <div class="mdetail-desc">
                    Adds a fill element that forces subsequent additions to the right side of the toolbar
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Fill</code><div class="sub-desc">The fill item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addItem"></a>
                <div class="mdetail">
                <h3>addItem</i></h3>
                <code>public function addItem(&nbsp;<code>Ext.Toolbar.Item item</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds any Toolbar.Item or subclass
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>item</code> : Ext.Toolbar.Item<div class="sub-desc"></div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Item</code><div class="sub-desc">The item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addSeparator"></a>
                <div class="mdetail alt">
                <h3>addSeparator</i></h3>
                <code>public function addSeparator()</code>
                <div class="mdetail-desc">
                    Adds a separator
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Item</code><div class="sub-desc">The separator item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addSpacer"></a>
                <div class="mdetail">
                <h3>addSpacer</i></h3>
                <code>public function addSpacer()</code>
                <div class="mdetail-desc">
                    Adds a spacer element
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Spacer</code><div class="sub-desc">The spacer item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="addText"></a>
                <div class="mdetail alt">
                <h3>addText</i></h3>
                <code>public function addText(&nbsp;<code>String text</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Adds text to the toolbar
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>text</code> : String<div class="sub-desc">The text to add</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Item</code><div class="sub-desc">The element's item</div></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="getEl"></a>
                <div class="mdetail">
                <h3>getEl</i></h3>
                <code>public function getEl()</code>
                <div class="mdetail-desc">
                    Returns the Element for this toolbar.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li>None.</li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Element</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                            <a name="insertButton"></a>
                <div class="mdetail alt">
                <h3>insertButton</i></h3>
                <code>public function insertButton(&nbsp;<code>Number index</code>, <code>Object/Ext.Toolbar.Item/Ext.Toolbar.Button (may</code>&nbsp;)</code>
                <div class="mdetail-desc">
                    Inserts any <a ext:cls="Ext.Toolbar.Item" href="Ext.Toolbar.Item.html">Ext.Toolbar.Item</a>/<a ext:cls="Ext.Toolbar.Button" href="Ext.Toolbar.Button.html">Ext.Toolbar.Button</a> at the specified index.
                <div class="mdetail-params">
                    <strong>Parameters:</strong>
                    <ul><li><code>index</code> : Number<div class="sub-desc">The index where the item is to be inserted</div></li><li><code>(may</code> : Object/Ext.Toolbar.Item/Ext.Toolbar.Button<div class="sub-desc">be Array)} item The button, or button config object to be inserted.</div></li>                    </ul>
                    <strong>Returns:</strong>
                    <ul>
                        <li><code>Ext.Toolbar.Button/Item</code></li>
                    </ul>
                </div>
                </div>
                <div class="mdetail-def">This method is defined by Toolbar.</div>
                </div>
                        </div>
        
                
        </div>
    <hr>
    <div style="font-size:10px;text-align:center;color:gray;">Ext - Copyright &copy; 2006-2007 Ext JS, LLC<br />All rights reserved.</div>

    </body>
</html>